fix(build): externalize onnxruntime-node for darwin-x64#13
Merged
Conversation
…built)
onnxruntime-node@1.24.3 ships bin/napi-v6/darwin/arm64 only — no darwin/x64.
Its binding.js requires the host platform/arch .node, so bundling on the
Intel-mac runner couldn't resolve darwin/x64 and failed the stable build,
blocking the v2.0.9 release. Mark it external for darwin-x64 only; the mic's
lazy import("@huggingface/transformers") catches the missing module and
degrades gracefully (Intel Macs can't run the native runtime anyway).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The v2.0.9 release build failed on the darwin-x64 stable target — a blocker per RELEASING.md (all 5 stable builds must pass). nothing was published.
Root cause
onnxruntime-node@1.24.3(pulled in by the on-device mic via@huggingface/transformers) shipsbin/napi-v6/darwin/arm64only — no darwin/x64 prebuilt. Itsbinding.jsdoesrequire(\../bin/napi-v6/${process.platform}/${process.arch}/onnxruntime_binding.node`), so bundling on the Intel-mac runner couldn't resolvedarwin/x64`.Fix
Mark
onnxruntime-nodeexternal for thedarwin-x64target only. The binary builds; the mic's lazyimport("@huggingface/transformers")(mic.ts, already wrapped in.catch) degrades gracefully on Intel Macs — which can't run the native runtime anyway. All other targets keep bundling it (their bindings exist).Verified
Cross-build of darwin-x64 locally now gets past the onnxruntime resolution (fails only on the x64 OpenTUI native lib absent on an arm64 host — present on the real Intel runner). Biome + typecheck clean.
🤖 Generated with Claude Code